package com.shhm.common.entity.common;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author JackZ
 * @version 1.0
 * @description: TODO
 * @date 2025/9/2 下午4:00
 */
@Data
@TableName("tb_product_status")
public class ProductStatusEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 申请人
     */
    private long applicationId;
    /**
     * 审核描述
     */
    private String auditDesc;
    /**
     * 创建日期
     */
    private LocalDateTime createTime;
    /**
     * 记录版本
     */
    private long dataVersion;
    /**
     * 审核员编号
     */
    private long operateId;
//    /**
//     * 商品编号
//     */
//    private long productId;
    /**
     * 商品编号
     */
    private String productNum;
    /**
     * 商品状态
     */
    private Integer productStatus;
    /**
     * 记录编号
     */
    private long recordId;
    /**
     * 更新日期
     */
    private LocalDateTime updateTime;

    public ProductStatusEntity(Long applicationId, String productNum) {
        this.applicationId = applicationId;
        this.productNum=productNum;
    }

    public void createLocalDateTime(){
        LocalDateTime now = LocalDateTime.now();
        this.createTime = now;
        this.updateTime = now;
    }
}
